<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Signs.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Signs.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '短信签名管理',
        name: 'Signs',
        url: '/Signs/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        merchantCode: '',
        signName: '',
        signSource: '',
        remark: '',
        signDocument: [],
        auditreason: '',
        creator: '',
        createDate: '',
        modifier: '',
        modifyDate: '',
      },
      editFormOptions: [
        [{ dataKey: 'Merchants', data: [], title: '商户编码', required: true, field: 'merchantCode', colSize: 12, type: 'select' }],
        [{ title: '签名名称', required: true, field: 'signName', colSize: 12, type: 'text' }],
        [{ dataKey: 'Sign', data: [], title: '签名来源', required: true, field: 'signSource', colSize: 12, type: 'select' }],
        [{ title: '备注', required: true, field: 'remark', colSize: 12, type: 'textarea' }],
        [{ title: '证明文件', required: true, field: 'signDocument', multiple: true, maxFile: 3,colSize: 12, type: 'img',storage:'OSS_Y'}],
        [{ title: '审核原因', field: 'auditreason', colSize: 12, type: 'textarea', hidden: true }],
        [
          { title: '创建人', field: 'creator', disabled: true, colSize: 6, type: 'text' },
          { title: '创建时间', field: 'createDate', disabled: true, colSize: 6, type: 'datetime' },
        ],
        [
          { title: '修改人', field: 'modifier', disabled: true, colSize: 6, type: 'text' },
          { title: '修改时间', field: 'modifyDate', disabled: true, colSize: 6, type: 'datetime' },
        ],
      ],
      searchFormFields: { signName: '', signSource: '', createDate: '', merchantCode: '' },
      searchFormOptions: [
        [
          { title: '签名名称', field: 'signName', type: 'like' },
          { dataKey: 'Sign', data: [], title: '签名来源', field: 'signSource', type: 'select' },
          { title: '创建时间', field: 'createDate', type: 'datetime' },
          { dataKey: 'Merchants', data: [], title: '商户编码', field: 'merchantCode', type: 'select' },
        ],
      ],
      columns: [
        { field: 'merchantCode', title: '商户编码', type: 'string', bind: { key: 'Merchants', data: [] }, width: 120, require: true, align: 'left' },
        { field: 'signName', title: '签名名称', type: 'string', width: 220, require: true, align: 'left', sortable: true },
        { field: 'signSource', title: '签名来源', type: 'string', bind: { key: 'Sign', data: [] }, width: 220, require: true, align: 'left' },
        { field: 'remark', title: '备注', type: 'string', width: 300, require: true, align: 'left' },
        { field: 'signDocument', title: '证明文件', type: 'img', width: 250, require: true, align: 'left' },
        { field: 'creator', title: '创建人', type: 'string', width: 180, readonly: true, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 220, readonly: true, align: 'left', sortable: true },
        { field: 'modifier', title: '修改人', type: 'string', width: 180, readonly: true, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 220, readonly: true, align: 'left', sortable: true },
        { field: 'auditDate', title: '审核日期', type: 'datetime', width: 220, hidden: true, align: 'left', sortable: true },
        { field: 'auditId', title: '审核员', type: 'int', width: 90, hidden: true, align: 'left' },
        { field: 'auditor', title: '审核员', type: 'string', width: 120, hidden: true, align: 'left' },
        { field: 'auditreason', title: '审核原因', type: 'string', width: 220, align: 'left' },
        { field: 'auditStatus', title: '审核状态', type: 'int', width: 120, require: true, align: 'left', bind: { key: 'audit', data: [] } },
        { field: 'createID', title: '创建人ID', type: 'int', width: 90, hidden: true, align: 'left' },
        { field: 'id', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'modifyID', title: '修改人ID', type: 'int', width: 90, hidden: true, align: 'left' },
        { field: 'distributorName', title: '商户名称', type: 'string', width: 120, align: 'left' },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
